<div ng-include="sys_html('common/_header')"></div>
<style>
p {margin:0}
.order-list .tips-icon svg {
	width:62px;
	margin-right:10px;
	fill:#1a8ee9
}
.order-list .tips-box {
	height:135px;
	margin-top:22px;
	background-color:#fff;
	border-radius:10px;
	box-shadow:0 0 5px #eee;
	display:flex;
	justify-content:center;
	align-items:center
}
.order-list .tips-txt {
	color:#666;
	font-size:16px;
	text-align:center
}
.order-list .link-box {
	margin:20px 0;
	padding:0 0.5rem;
	display:flex;
	justify-content:space-between
}
.order-list .link-btn {
	width:48%;
	height:46px;
	line-height:46px;
	border-radius:10px;
	text-align:center;
	font-size:18px;
	font-weight:600
}
.order-list .link-btn1 {
	background-color:#fff;
	box-shadow:0 0 3px #ccc
}
.order-list .link-btn2 {
	background-color:#fe254f;
	box-shadow:0 0 3px #fe254f;
	color:#fff
}
</style>
<div class="fui-page order-list-page">
	<div class="fui-tab fui-tab-danger" style="top:0;margin-top:0">
			<a ng-class="{'external active':pagedata.type == 'log'}" href="javascript:" ng-click="pagedata.type = 'log';tool.get_list('jy_creditshop/log_list/',true)" class="external">兑换记录</a>
			<a ng-class="{'external active':pagedata.type == 'order'}" ng-click="pagedata.type = 'order';pagedata.status=0;tool.get_list('jy_jifenyou/order//getlist/status=0',true)">秒杀订单</a>
	</div>
	<div ng-if="pagedata.type == 'log'" class="fui-tab fui-tab-danger" style="margin-top:0">
		<a ng-class="{'external active':pagedata.params.type == 100}" href="javascript:" ng-click="tool.get_list('jy_creditshop/log_list/main/');pagedata.params.type = 100">全部记录</a>
        <a ng-class="{'external active':pagedata.params.type == 0}" href="javascript:" ng-click="tool.get_list('jy_creditshop/log_list/main/');pagedata.params.type = 0">兑换记录</a>
        <a ng-class="{'external active':pagedata.params.type == 1}" href="javascript:" ng-click="tool.get_list('jy_creditshop/log_list/main/');pagedata.params.type = 1">中奖记录</a>
	</div>
	 <div ng-if="pagedata.type == 'order'" class="fui-tab fui-tab-danger" style="margin-top:0">
			<a ng-class="{'external active':pagedata.status == 100}" href="javascript:" ng-click="pagedata.status = 100;tool.get_list('jy_jifenyou/order//getlist/',true)" class="external">全部</a>
			<a ng-class="{'external active':pagedata.status == 0}" ng-click="pagedata.status=0;tool.get_list('jy_jifenyou/order//getlist/status=0',true)">待付款</a>
			<a ng-class="{'external active':pagedata.status == 1}" ng-click="pagedata.status=1;tool.get_list('jy_jifenyou/order//getlist/status=1',true)">待发货</a>
			<a ng-class="{'external active':pagedata.status == 2}" ng-click="pagedata.status=2;tool.get_list('jy_jifenyou/order//getlist/status=2',true)">待收货</a>
			<a ng-class="{'external active':pagedata.status >=3 && pagedata.status !=100}" ng-click="pagedata.status=5;tool.get_list('jy_jifenyou/order//getlist/=1',true)">售后中</a>
	</div>
	<div class='fui-content order-list' style="margin-top:4.7rem">		
		<div ng-if="pagedata.type == 'order'" ng-include="sys_html('_order')"></div>
		<div ng-if="pagedata.type == 'log'" ng-include="sys_html('_log')"></div>
		<div ng-if="pagedata.loading" class='infinite-loading'><span class='fui-preloader'></span><span style="margin-left:1.5rem"> 正在加载...</span></div>
		<div class="tips-box"><div class="tips-icon"><svg id="icondingdanchaxun" viewBox="0 0 1024 1024"><path d="M283.74701155 144.29934933h203.08716445c22.9909997 0 44.06608236-22.73209245 44.06608236-49.19245392s-19.15916683-49.14067319-44.06608236-49.14067319H283.74701155c-24.90691675 0-44.06608236 20.81617541-44.06608237 49.14067319 0 28.37627851 19.15916683 49.19245392 44.06608237 49.19245392z m450.2921932 691.95659735c-17.24324978 0-32.57058251-1.91591705-47.89791645-9.47602015s-28.73874963-15.12020741-40.23424948-26.46036268c-11.49549985-9.47602015-21.07508266-22.68031052-26.82283259-37.80051793-5.74774992-15.12020741-9.63136475-30.24041362-9.63136474-47.27653687s1.96769777-32.15633067 9.63136474-47.27653808c7.66366698-13.20429037 15.32733273-26.46036268 26.82283259-37.80051795 11.49549985-11.34015525 24.90691675-20.81617541 40.23424948-26.46036146 15.32733273-5.69596799 30.65466668-9.47602015 47.89791645-9.47602015s32.57058251 3.78005216 47.89791524 9.47602015c13.4114169 7.5601031 26.82283259 15.12020741 38.31833365 26.46036146 11.49549985 11.34015525 21.07508266 22.68031052 26.82283258 37.80051795s9.57958281 30.24041362 9.5795828 47.27653808-1.91591705 32.15633067-9.5795828 47.27653687c-7.66366698 13.20429037-15.32733273 26.46036268-26.82283258 37.80051793-9.57958281 11.34015525-22.9909997 20.81617541-38.31833365 26.46036268-15.32733273 5.69596799-30.65466668 9.47602015-47.89791524 9.47602015z m262.53236148 79.38108681c-3.88361482-3.78005216-9.57958281-9.42423822-17.24324978-18.90025957l-30.70644861-30.24041362-42.15016531-39.71643377c13.4114169-18.90025836 21.07508266-39.71643377 26.82283258-62.39674551 5.74774992-22.68031052 7.66366698-45.36062103 5.74774992-68.04093155-1.91591705-22.68031052-7.66366698-45.36062103-17.24324978-66.17679645s-22.9909997-41.58056889-40.23424947-58.61669212c-21.07508266-18.90025836-44.06608236-34.02046578-68.97299911-43.49648592-26.82283259-9.42423822-51.72974933-15.12020741-78.55258192-15.12020743-24.90691675 0-51.72974933 5.69596799-76.63666608 15.12020743-26.82283259 9.47602015-49.81383229 24.59622756-68.97299912 43.49648592-21.12686459 18.90025836-36.45419732 41.58056889-46.03378133 66.17679644s-15.32733273 49.14067319-15.32733274 75.60103466c0 24.59622756 5.74774992 51.05658902 15.32733274 75.65281659 9.57958281 24.54444563 24.90691675 47.27653808 46.03378133 66.17679644 17.19146784 18.90025836 38.31833244 32.10454873 59.39341631 41.58056889 21.07508266 9.47602015 44.06608236 15.12020741 67.05708206 17.03612446 22.9909997 1.86413511 45.98199941 0 68.97299911-5.69596921 22.9909997-3.78005216 44.06608236-13.20429037 65.14116624-24.59622634l76.63666487 68.09271227c5.74774992 5.64418727 11.49549985 9.42423822 19.15916683 13.20429037 5.74774992 3.78005216 15.32733273 7.5601031 21.07508265 9.47602015 5.79953186 1.86413511 13.46319762 3.78005216 21.1268646 3.78005216s13.4114169-1.91591705 17.24324977-7.5601031c7.66366698-7.5601031 11.49549985-15.12020741 9.57958402-24.59622757-1.91591705-7.5601031-7.66366698-18.90025836-17.24324978-30.24041362zM193.64714784 310.673408h383.23510993c13.4114169 0 26.87461452 15.12020741 26.87461452 32.10454873 0 15.12020741-15.32733273 32.15633067-28.79053035 32.15633066H189.81531497c-13.4114169 0-22.9909997-17.03612325-22.99099972-32.15633066s11.49549985-32.10454873 26.82283259-32.10454873z m262.53236148 425.38527645v-7.56010431H187.89939792c-13.4114169 0-28.73874963-18.9520403-28.73874963-35.93638161 0-15.12020741 11.49549985-30.24041362 26.82283379-30.24041484h279.77561126c9.57958281-39.71643377 26.82283259-75.65281659 51.72974934-107.80914725H189.81531497c-13.4114169 0-22.9909997-16.98434253-22.99099972-32.10454874 0-15.12020741 11.49549985-32.15633067 26.82283259-32.15633067h385.15102698c21.12686459-16.98434253 44.1178643-30.24041362 70.94069687-37.80051793 34.48649955-15.12020741 72.80483199-24.59622756 111.12316564-24.59622635V193.44002253c0-66.17679645-32.57058251-111.53741748-97.71174874-111.53741748h-88.18394665c1.91591705 5.64418727 1.91591705 11.34015525 1.91591583 16.98434131 0 41.63235082-26.82283259 81.29700386-57.47749926 81.29700386H247.34459616c-32.62236445 0-59.44519702-39.66465305-59.44519824-81.29700386 0-5.64418727 0-11.34015525 1.91591705-16.98434131H99.76723319C26.96239999 81.90260505 9.71915022 127.26322608 9.71915022 193.44002253v656.02021452c0 71.87276444 24.90691675 109.67328237 93.87991586 109.67328236h448.37627615c-57.47749925-56.7007763-95.79583169-136.13364505-95.79583291-223.07483496z"></path></svg></div><div class="tips-txt"><p>请先输入手机号</p><p>查询您的订单信息</p></div></div>
		<div class="link-box"><div ng-click="access_json('jy_jifenyou/kefu/')" class="link-btn link-btn1">联系客服</div><div ng-click="access_json('jy_jifenyou/index/')" class="link-btn link-btn2">继续下单</div></div>
		<div ng-if="pagedata.list.length <=5" class="fui-cell-group">
			<div class="fui-cell" style="padding:0.65rem 0.3rem">
				  <div class="fui-cell-label bold" style="width:auto">为你推荐 </div>
				  <div class="fui-cell-info"></div>
				  <div class="fui-cell-remark noremark" style="font-size: 12px;color:#999">精心为您推荐</div>
			 </div>
		</div>
		<div ng-if="pagedata.list.length <=5" ng-include="sys_html('_hotgoods')"></div>
		</div>
	</div>
</div>

<!-- 关注公众号 -->
<div id="attention" ng-if="pagedata.showwechatcode==1">
    <div class="attention-alert">
        <div class="attention-img"><img ng-src="{{tomedia(pagedata.shopset.store_logo) || '../core/resource/images/nopic.jpg'}}" alt=""></div>
        <div class="attention-title">亲爱的上帝，为了您能正常的接收物流信息，请您先关注我们的公众号</div>
        <div class="attention-content">
            <div class="col-jy-2" style="text-align: center;"><img ng-src="{{tomedia(pagedata.shopset.followqrcode) || '../core/resource/images/nopic.jpg'}}" style="width: 5.35rem"></div>
            <div class="col-jy-2" style="text-align: center;"><img src="../addons/jy_weishop/images/zhiwen.png" style="width: 3.3rem;margin:auto"></div>
            <p >长按指纹识别图中二维码</p>
        </div>
        <i class="icon icon-cuowu" ng-click="pagedata.showwechatcode=0" style="font-size:1.5rem;color:#fff;position: absolute;top:105%;left:46%"></i>
    </div>
</div>
<div ng-include="sys_html('common/pluginnav',true)"></div>
<script>
//手机软键盘--搜索
$("body").keydown(function() {
    if (event.keyCode == "13") {
        $('#searchsub').click();
    }
});
scope.pagedata.payaddprice=function(id){
	scope.post_json('jy_jifenyou/order/payaddfee/id='+id,{},function(result){
		scope.pagedata.order_id=result.order_id;
		scope.$evalAsync();
		scope.tool.pay(result.pay_id,function(res){
				if(res.type=='success'){
					scope.message('支付成功！','success','jy_jifenyou/order/');
				}else{
					scope.message('支付失败！','success','jy_jifenyou/order/');
				}
			});
	});
}
if(scope.pagedata.gopayaddpriceid>0){
	scope.pagedata.payaddprice(scope.pagedata.gopayaddpriceid);
}
if(scope.pagedata.type=='order'){
scope.tool.get_list('jy_jifenyou/order/getlist/',true);
scope.pagedata.scroll_bottom=function(){
	scope.tool.get_list('jy_jifenyou/order/getlist/status='+scope.pagedata.status);
}
}else{
scope.tool.get_list('jy_creditshop/log_list/main/',true);
scope.pagedata.scroll_bottom=function(){
	scope.tool.get_list('jy_creditshop/log_list/main/');
}
}
</script>